<!DOCTYPE html>
<html>
    <head>
        {include file='public/meta'/}
        <link rel="stylesheet" href="/assets/merchant/css/bootstrapSwitch.css">

        <link rel="stylesheet" href="/assets/merchant/css/addmchat.css"/>

        <script src="/assets/merchant/js/bootstrap-datetimepicker.js" type="text/javascript" charset="utf-8"></script>
        <script src="/assets/merchant/js/liandong.js" type="text/javascript" charset="utf-8"></script>

        <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=KNPBZ-RXKWI-SJJGI-5S3HH-AGDS6-Q6BDW"></script>
        <script>
            var init = function() {
                var center = new qq.maps.LatLng(36.067972, 113.837242);
                map = new qq.maps.Map(document.getElementById('container'), {
                    center: center,
                    zoom: 13
                });
                var latlngBounds = new qq.maps.LatLngBounds();
                //调用Poi检索类
                searchService = new qq.maps.SearchService({
                    complete : function(results){
                        var pois = results.detail.pois;
                        for(var i = 0,l = pois.length;i < l; i++){
                            var poi = pois[i];
                            latlngBounds.extend(poi.latLng);
                            var marker = new qq.maps.Marker({
                                map:map,
                                position: poi.latLng
                            });
                            marker.setTitle(i+1);
                            markers.push(marker);
                        }
                        map.fitBounds(latlngBounds);
                    }
                });
                //调用poi类信接口
                function searchKeyword() {
                    var keyword = document.getElementById("keyword").value;
                    region = new qq.maps.LatLng(39.936273,116.44004334);

                    searchService.setPageCapacity(5);
                    searchService.searchNearBy(keyword, region, 2000);//根据中心点坐标、半径和关键字进行周边检索。
                }
                qq.maps.event.addListener(
                    map,
                    'click',
                    function(event) {
                        $("#latitude").val(event.latLng.getLat());
                        $("#longitude").val(event.latLng.getLng());
                    }
                );
            }
        </script>
        <style>
            .filePicker{
                margin-top: -5px;
                width: 150px;
                height: 44px;
                background: #00A2D4;
                color: #fff;
                text-align: center;
                line-height: 44px;
                border-radius: 4px;
                cursor: pointer;
            }
            .file{
                position: absolute;
                left: 14px;
                top: -5px;
                width: 150px;
                height: 44px;
                line-height: 44px;
                opacity: 0;
                cursor: pointer;
            }
            .img-file{
                width: 100px;
                height: 100px;
                display: block;
                margin-left: 26px;
                margin-top: 10px;
                display: none;
            }
            .form-control{
                width: 50%;
            }
        </style>
    </head>
    <body onload="init()">
    {include file='public/header'/}
    <!------------------导航-------------------------->
    <section>
        {include file='public/left'/}
        <!--------------------------主要内容区域------------------------------------->
        <div class="content">
            <div class="page-heading">
                <ul class="breadcrumb">
                    <li>
                       当前位置是&nbsp;:&nbsp;微信门店
                    </li>
                    <li class="active" style="color: #02b87f;"> 添加门店</li>
                </ul>
            </div>
            <div class="panel mgr15 mgl15">
                <div class="panel-heading addCharts" style="background:#ededed;">
                    添加门店
                </div>
                <div class="panel-body">
                    <div class="col-md-3">
                        <div class="">
                            <ul id="myTab" class="nav nav-pills nav-stacked" role="tablist">
                                <li role="presentation" class="active"><a href="#base" role="tab" data-toggle="tab" aria-controls="base">基本信息</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-md-9">
                    <form class="form-horizontal adminex-form" action='' method="post">
                <div class="tab-content">
                    <!--基础字段-->
                    <div role="tabpanel" class="panel-body tab-pane active" id="base" aria-labelledBy="base-tab">
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">门店名称</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" name='business_name' placeholder="">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">分店名称</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" name='branch_name' placeholder="">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">门店所在省份</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" name='province' placeholder="">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">门店所在城市</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" name='city' placeholder="">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">门店所在地区</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" name='district' placeholder="">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">门店所在街道</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" name='address' placeholder="">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">门店的电话</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" name='telephone' placeholder="">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">门店的类型</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" name='categories' placeholder="">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">坐标系</label>
                            <div class="col-sm-10">
                                <select name="offset_type" class="form-control border-no">
                                    <option value="1">火星坐标</option>
                                    <option value="2">SOGOU经纬度</option>
                                    <option value="3">为百度经纬度</option>
                                    <option value="4">mapbar经纬度</option>
                                    <option value="5">为GPS坐标</option>
                                    <option value="6">SOGOU墨卡托坐标</option>
                                </select>
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">地理位置经度</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" id="longitude" name='longitude' placeholder="火星坐标">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">地理位置纬度</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control col-sm-6 col-xs-7" id="latitude" name='latitude' placeholder="火星坐标">
                                <div class="error"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">搜索地点</label>
                            <div class="col-sm-10">
                                <input id="keyword" type="textbox" class="form-control col-sm-6 col-xs-7" placeholder="在下方地图上单击地址完成选择">
                                <input type="button" value="search" class="btn btn-primary" onclick="searchKeyword()">

                            </div>
                        </div>
                        <div id="container" style="width:800px; height:500px"></div>
                        <div class="error"></div>
                    </div>
                    <!--自定义字段-->

                        <div style="text-align: center">
                            <button type="submit" class="btn btn-primary">添加</button>
                        </div>

                </div>
                    </form>
                    </div>
                </div>
            </div>
            {include file='public/footer'/}
        </div>
    </section>
</body>
    <script src="__PUBLIC__/Admin/js/bootstrapSwitch.js"></script>
    <script src="__PUBLIC__/Admin/js/commen.js" type="text/javascript" charset="utf-8"></script>
    <script>
        $(function () {
            $('#myTab a:first').tab('show');
        });
    </script>



</html>
